import { post, postcontent, get } from "../api";
//查询公司列表
export const selectCompanyList = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/companylist', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//查询监控
export const selectMonitorList = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/camera/sysdata', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//根据企业id人员定位
export const selectPeopleById = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/userposbycompany', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//人员定位搜索
export const searchPersonPosition = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/userposbysearch', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取所有卡口列表
export const selectBayonetList = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/camera/bayonet', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取危化品车辆定位
export const selectAllVehicle = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/carposinfo', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取新危化品车辆定位
export const selectAllVehicleNew = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/vehicle/vehicleposinfo', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//根据危化品车辆ID获取详情
export const selectVehicleDetailById = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/getdetails', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//根据车牌号查询运单详情
export const selectVehicleDetailByCarnum = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/vehicle/getdetails', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//查询监控详情
export const selectMonitorByIds = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/camera/list', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取监控预览
export const selectMonitorDetail = (params) => new Promise((resolve, reject) => {
    post('mpsh/client/camera/preview', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取所有电子巡查列表
export const selectInspectionList = (params) => new Promise((resolve, reject) => {
    post('mpsh/client/screen/emergency', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取电子巡查轨迹
export const selectInspectionRoad = (params) => new Promise((resolve, reject) => {
    post('mpsh/client/screen/emergencytrack', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//获取人员详情
export const selectPersonDetailById = (params) => new Promise((resolve, reject) => {
    post('mpsh/client/screen/userinfo', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})
//根据日期和imei号查询危险品车辆轨迹
export const selectVehicleDetail = (params) => new Promise((resolve, reject) => {
    post('mpsh/client/screen/cartrack', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})

//根据车牌号危化品车辆轨迹
export const selectVehicleDetailNew = (params) => new Promise((resolve, reject) => {
    post('mpsh/client/vehicle/cartrack', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})